/*
 *    Copyright 2009-2023 the original author or authors.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       https://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.apache.ibatis.ryan.dao;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.ryan.builder.Builder;
import org.apache.ibatis.ryan.builder.CountBuilder;
import org.apache.ibatis.ryan.builder.DeleteBuilder;
import org.apache.ibatis.ryan.builder.InsertBuilder;
import org.apache.ibatis.ryan.builder.NativeSQLBuilder;
import org.apache.ibatis.ryan.builder.UpdateBuilder;
import org.apache.ibatis.ryan.domain.PagedList;

public interface AutoBaseDao {

  <T> int save(T var1);

  int save(InsertBuilder<?> var1);

  int deleteById(String var1, Object var2);

  int deleteByColum(String var1, String var2, Object var3);

  int delete(DeleteBuilder<?> var1);

  int update(UpdateBuilder var1);

  <T> int updateByColName(T var1, String var2, Object var3);

  <T> List<T> listByColName(Class<T> var1, String var2, Object var3);

  <T> PagedList<T> listPageByColName(Class<T> var1, String var2, Object var3);

  <T> PagedList<T> listPage(Builder<T> var1);

  <T> List<T> listAll(Builder<T> var1);

  <T> T findOne(Builder<T> var1);

  <T> T findOneByColName(Class<T> var1, String var2, Object var3);

  <T> T findById(Class<T> var1, Object var2);

  BigDecimal count(CountBuilder<?> var1);

  Integer nativeExecute(NativeSQLBuilder var1);
}
